﻿using System.Drawing;
using System.Windows.Forms;

namespace Rename.UC.组合
{
    public partial class Uc添加拖拽文件 : UserControl
    {
        public Uc添加拖拽文件()
        {
            InitializeComponent();
            ucBtn添加拖拽.Font= Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            ucBtn添加拖拽.ForeColor = Color.FromArgb(99, 124, 252);
            ucBtn添加拖拽.AllowDrop = true;
            //Console.WriteLine($"BTN {ucBtn添加拖拽.Width} {ucBtn添加拖拽.Height} {this.Width} {this.Height}");
        }

        public void SetBakcgroundImageAndText(string imgName,string text)
        {
            if(imgName== "批量新建文件夹")
            {
                ucBtn添加拖拽.Text = "暂无文件信息...";
                Image img = Properties.Resources.ResourceManager.GetObject($"背景_批量新建文件夹") as Image;
                ucBtn添加拖拽.Image = img;
            }
            else
            {
                ucBtn添加拖拽.Text = text;
                Image img = Properties.Resources.ResourceManager.GetObject($"背景_文件重命名") as Image;
                ucBtn添加拖拽.Image = img;
            }
        }
    }
}
